import Layout from '../components/Layout'
// import Yyx from '../components/Yyx'
// import Error from '../components/404'

let routes = [
    {
        path: "/",
        meta: {
            title: '根目录',
            icon: 'el-icon-more-outline',
            hidden: true  
        },
        component: Layout,
        redirect: {
            path: '/Chart'
        },
        children: [
            {
                path: 'Chart',
                name: 'Chart',
                meta: {
                    title: '图表',
                    icon: 'el-icon-discover'
                },
                component: () => import('../views/Chart')
            },
            {
                path: "Login",
                meta: {
                    title: '登录',
                    icon: 'el-icon-check',
                    hidden: true
                },
                component: () => import('../views/Login'),
            },
            //     {
            //         path: "/Yyx",
            //         title:'杨永信高光时刻',
            //         component: ()=>import('../components/Yyx'),
            //     },
        ]
    },
    {
        path: '/system',
        component: Layout,
        name: 'system',
        meta: {
            title: '系统设置',
            icon: 'el-icon-setting'
        },
        children: [
            {
                path: 'user',
                meta: {
                    title: '用户设置',
                    icon: 'el-icon-user'
                },
                name: 'user',
                component: () => import('../components/User'),
                children: [
                    {
                        path: 'users',
                        meta: {
                            title: '用户信息',
                            icon: 'el-icon-user'
                        },
                        component: () => import('../views/users')
                    },
                    {
                        path: 'password',
                        meta: {
                            title: '修改密码',
                            icon: 'el-icon-key'
                        },
                        component: () => import('../components/Password')
                    },
                    {
                        path: 'avatar',
                        meta: {
                            title: '上传头像',
                            icon: 'el-icon-picture-outline-round'
                        },
                        component: () => import('../components/Avatar')
                    },
                ],
            },
            {
                path: 'role',
                meta: {
                    title: '角色设置',
                    icon: 'el-icon-edit'
                },
                name: 'role',
                component: () => import('../components/Role')
            },
            {
                path: 'userRole',
                meta: {
                    title: '用户角色',
                    icon: 'el-icon-loading'
                },
                component: () => import('../components/UserRole')
            },
        ],
    },
    // {
    //     path:"/Yyx",
    //     component:Yyx
    // },
    // {
    //     path:"/error",
    //     component:Error
    // }

]

export default routes;